﻿using System.Collections.Generic;
using System.Linq;

namespace ForceSystem.Untangler
{
    public class UntangledNamespace
    {
        public string Name { get; private set; }
        public UntangledTypeCollection Types { get; set; }

        public UntangledNamespace(string name)
        {
            Name = name;
            Types = new UntangledTypeCollection();
        }

        internal UntangledNamespace( string name, IEnumerable<UntangledType> types )
        {
            Name = name;
            var list = types.OrderBy(s => s.DisplayName).ToArray();
            Types = new UntangledTypeCollection(list);
        }
    }
}
